namespace _191 {

var hammingWeight = function(n: number): number {
    let answer = 0
    for(var i = 0; i < 32; i++) {
        if (n % 2 !== 0) answer++
        n >>= 1
    }
    return answer
};

console.assert (hammingWeight( 11) === 3)

}